#ifndef CHARACTER_SHEET_H_INCLUDED_15070742
#define CHARACTER_SHEET_H_INCLUDED_15070742
//-----------------------------------------------------------------------------
// Copyright (c) 2011 David Waby
// Initially created on 07/11/2011
//-----------------------------------------------------------------------------
     
//-----------------------------------------------------------------------------
class CharacterSheet
{
public:

	struct PrimaryStats
	{
		enum Enum
		{
			Strength,		// STR
			Agility,		// AGI
			Luck,			// LUC
			Speed,			// SPE
			Stamina,		// STA
			Noof,
		};
	};

	struct DerivedStats
	{
		enum Enum
		{
			ActionPoints,	// (AGI/2)+5
			Dodge,			// AGI
			CriticalStrike,	// LUC
			HealingRate,	// STA/3 (min 1)
			HitPoints,		// 15+(2*STA)+STR
			Sequence,		// SPE*2
			MeleeDamage,	// STR-5 (min 1)
			Noof,
		};
	};

									CharacterSheet();
	virtual							~CharacterSheet();

	void							InitSetLevel(int const i_level);
	void							InitSetPrimaryStat(PrimaryStats::Enum const i_stat, int const i_value);
	void							Init();

	void							IncreaseXP(int const i_xp);
	bool							AssignSkillPoint(PrimaryStats::Enum const i_stat);

protected:

private:

	void							IncreaseLevel();
	void							ClearPrimaryStats();
	void							CalculateSkillPoints();
	void							CalculateXPForNextLevel();
	void							CalculateDerivedStats();

	int								m_level;

	int								m_requiredXP;
	int								m_xp;

	int								m_hp;

	int								m_skillPoints;
	int								m_primaryStats[PrimaryStats::Noof];
	int								m_derivedStats[DerivedStats::Noof];

									CharacterSheet(const CharacterSheet &rhs);
									CharacterSheet& operator = (const CharacterSheet &rhs);
};


//-----------------------------------------------------------------------------
#endif // CHARACTER_SHEET_H_INCLUDED_15070742
